function parseData(){
	var p=getQ()
	if(p.type==="exp"){
	jQuery.ajax({
		"url":"/exp_comment/",
		"error":errorAjax,
		"beforeSend":start_load_pic,
		"complete":stop_load_pic,
		"data":{"id":p.id},
		"success":function(data){
			data=JSON.parse(data)
			if(!data.status){
				showErrorInfo(data);	
				return false;
			}
			else{
				document.getElementById("comment").value=data.content.comment;
			}
		}
		
	})
	}
	else if(p.type==="xiti"){
	jQuery.ajax({
		"url":"/xiti_comment/",
		"error":errorAjax,
		"beforeSend":start_load_pic,
		"complete":stop_load_pic,
		"data":{"id":p.id,"student_username":getQ().student_username},
		"success":function(data){
			data=JSON.parse(data)
			if(!data.status){
				showErrorInfo(data);	
				return false;
			}
			else{
				document.getElementById("comment").value=data.content.comment;
			}
		}
		
	})
	}
}
function submitComment(){
	var data={}
	
	data.comment=document.getElementById("comment").value
	data.id=getQ().id
	data["student_username"]=getQ().student_username
	data=JSON.stringify(data)
	if(getQ().type==="exp"){
	jQuery.ajax({
		"url":"/exp_comment/",
		"type":"POST",
		"error":errorAjax,
		"beforeSend":start_load_pic,
		"complete":stop_load_pic,
		"data":{"data":data},
		"success":function(data){
			data=JSON.parse(data)
			if(!data.status){
				showErrorInfo(data.content);
				return false;
			}
			else{
				alert("操作成功！")
				window.close();
			}
		}
	})
	}
	else if(getQ().type==="xiti"){
	jQuery.ajax({
		"url":"/xiti_comment/",
		"type":"POST",
		"error":errorAjax,
		"beforeSend":start_load_pic,
		"complete":stop_load_pic,
		"data":{"data":data},
		"success":function(data){
			data=JSON.parse(data)
			if(!data.status){
				showErrorInfo(data.content);
				return false;
			}
			else{
				alert("操作成功！")
				window.close();
			}
		}
	})
	}
	
}
if(getQ().model==="e"){
	document.getElementById("confirm").onclick=function(){
		submitComment();
	}
}
else{
	$("#confirm").hide()
}
parseData()
